export interface Script {
  id: string
  name: string
  content: string
  description?: string
  tags: string[]
  folder_id?: string
  created_by: string
  created_at: string
  updated_at: string
  folder_path?: string
  version_count?: number
  last_executed_at?: string
}

export interface CreateScriptData {
  name: string
  content?: string
  description?: string
  tags?: string[]
  folder_id?: string
  created_by?: string
}

export interface UpdateScriptData {
  name?: string
  content?: string
  description?: string
  tags?: string[]
  folder_id?: string
}

export interface ScriptSearchParams {
  keyword?: string
  tags?: string[]
  folder_id?: string
  created_by?: string
  limit?: number
  offset?: number
}

export interface ScriptStats {
  total_scripts: number
  total_executions: number
  success_rate: number
  avg_execution_time: number
  most_used_tags: Array<{
    tag: string
    count: number
  }>
}